import request from '@/utils/request'

// 专业名称-获取结构树
export const getMajorNameTree = () => {
  return request({
    url: '/school/manager/course/getMajorNameTree',
    method: 'get'
  })
}

// 专业名称添加
export const addMajorName = (data) => {
  return request({
    url: '/school/manager/course/addMajorName',
    method: 'post',
    data
  })
}

// 专业名称修改
export const editMajorName = (data) => {
  return request({
    url: '/school/manager/course/editMajorName',
    method: 'put',
    data
  })
}

// 专业名称删除
export const deleteMajorName = (ids) => {
  return request({
    url: '/school/manager/course/deleteMajorName/' + ids,
    method: 'delete',
  })
}

// 专业名称-修改排序
export const editMajorNameSort = (ids) => {
  return request({
    url: '/school/manager/course/editMajorNameSort/' + ids,
    method: 'put',
  })
}

// 班级名称是否唯一
export const checkIsUniqueClassName = (params) => {
  return request({
    url: '/school/manager/Organization/class/checkIsUniqueClassName',
    method: 'get',
    params: params
  })
}
